home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-19
/
pkey12_1.zip
/
LD.LSP
< prev
next >
Wrap
Text File
|
1992-09-13
|
2KB
|
50 lines
;Add a leader note to your drawing (handy)
;
;
(defun lderr (s)
(if (/= s "Function cancelled")(princ (strcat "\nError: " s)))
(setq rw *rw)
(setq tg *tg)
(setq kb *kb)
(setvar "orthomode" OM)
(setq *error* olderr)
(princ))
(defun dtr (angg)
(* pi (/ angg 180.0)))
(setq olderr *error* *error* lderr)
(if (= *rw nil)(setq *rw "A")(setq rw *rw))
(setq om (getvar "orthomode"))
(if (= *scf nil)(setq *scf 96.0)
(setq scf *scf))
(setq OM(getvar"orthomode"))
(princ "\nEnter the Scale Factor for this sheet < ")
(princ *scf)
(setq scf (getreal " >: "))
(if (= scf nil)(setq scf *scf)(setq *scf scf))
(setq arw(getstring (strcat "\n(A)rch. arrow. (D)im arrow. Do(T). < ")
(prompt *rw)(prompt "\ >")(princ)))
(if(= arw "")(setq arw *rw)(setq *rw arw))
(IF(OR(= arw "A")(= arw "a"))(SETQ arw "aarw"))
(IF(OR(= arw "D")(= arw "d"))(SETQ arw "darw"))
(IF(OR(= arw "T")(= arw "t"))(SETQ arw "dota"))
(setq FP(getpoint "\nPick leader startpoint : "))
(setvar "orthomode" 0)
(setq SP(getpoint FP "\nsecond point: "))
(command "line" fp sp "")
(setvar "orthomode" 1)
(setq EP(getpoint sp "\nend point: "))
(IF(= EP NIL)(SETQ EP SP))
(setq tt(* scf 0.05))
(setq a1(angle fp sp))
(setq a2(* a1 57.2958))
(setq ang(angle sp ep))
(setq tpa(polar ep(+ ang (dtr 0)) tt))
(setq tp1(polar tpa(- ang (dtr 90)) tt))
(setq th(* scf 0.09375))
(command"insert" arw fp scf "" a2)
(command"line" sp ep "")
(command"dtext" tp1 "0")
(setq *error* olderr)
(setvar "orthomode" om)
(setq fp nil sp nil ep nil tt nil a1 nil a2 nil ang nil tpa nil tp1 nil th nil arw1 nil lderr nil)
(princ)